<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>自定义组卷</title>
		<link rel="stylesheet" href="css/pages.css" />
		<link href="css/codemirror.css" rel="stylesheet">
		<link href="css/create.css" rel="stylesheet">
		<script type="text/javascript" async="" src="js/vds.js"></script>
		<script src="js/hm.js"></script>
		<script src="js/wj.js"></script>
		<link rel="stylesheet" type="text/css" href="css/normalize.css" />
		<link rel="stylesheet" type="text/css" href="css/htmleaf-demo.css">
		<script type="text/javascript" src="js/codemirror.js"></script>
		<link href="css/create_text_project.css" rel="stylesheet">
		<script type="text/javascript" src="js/jquery_002.js"></script>
		<script type="text/javascript" src="js/jquery.js"></script>
		<script type="text/javascript" src="js/base_utils.js"></script>
		<script type="text/javascript" src="js/create_cq.js"></script>
		<style type="text/css">
			body{
				background-color: #2F3238;
			}
			#div1-1 {
				height: 400px;
				position: relative;
				top: 5px;
			}
			#div1-2 {
				position: relative;
				top: 30px;
			}
			#div-1{
				position: absolute;
				width: 100%;
				height: 87px;
				background-color: #000000;
			}
			#div-1-1{
				width: 150px;
				background-color: #000000;
			}
		</style>
	</head>
	<body>
		<div id="div-1">
			<div id="div-1-1">
				<br />
				<a href="#" class="back" style="color: white; font-size: 25px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回&nbsp;&nbsp;&nbsp;</a>
				<br/><br/>
			</div>
		</div>
		<div class="textProject">
			<div class="editInfo">
				<div class="editCon" id="editCon">
					<div id="div1-1">
						显示数据库查询出来的题
					</div>
					<div id="div1-2">
						<div class="black2">
							<a class="disabled">&lt;</a>
							<span class="current">1</span>
							<a href="#?page=2">2</a>
							<a href="#?page=3">3</a>
							<a href="#?page=4">4</a>
							<a href="#?page=5">5</a>...
							<a href="#?page=199">199</a>
							<a href="#?page=200">200</a>
							<a href="#?page=2"> > </a>
						</div>
					</div>
				</div>
				<div class="edit_bottom">
				
				</div>
			</div>
			<form id="f1" action="/TestManagementSystem/admin/exempaperServlet/randomGroupExempaper" method="post">
			<div class="previewProj">
				<div class="preview_head"></div>
				<div class="previewCon">
					<div id="outProject" class="outProject">
						<table id="tab-1">
						<tr>
							<td>试卷标题<input type="text" name="examPaperName"/></td>
						</tr>
							<tr>
								<td style="width: 30%;">所属科目：&nbsp;&nbsp;
									<select name="courseId">
										<option value="请选择">---请选择---</option>
									</select>
								</td>
								<td style="width: 30%;">考试阶段：&nbsp;&nbsp;
									<select name="gradeId">
										<option value="请选择">---请选择---</option>
									</select>
								</td>
							</tr>
							<tr>
								<td style="width: 30%;">考试时长：&nbsp;&nbsp;
									<input type="text" name="examPaperTestTime"  style="width: 103px;"/>&nbsp;&nbsp;分钟
								</td><td style="width: 30%;">试题总分：&nbsp;&nbsp;
									<input type="text" name="examPaperTotalScore" style="width: 103px;"/>&nbsp;&nbsp;分
								</td>
							</tr>
							<tr>
								<td style="width: 30%;">总题数：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<input type="text" name="examPaperTestNum"/>
								<td style="width: 30%;">出卷人：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									<font id="create_project_name">张三</font>
								</td>
							</tr>
						</table><br /><br />
						<input type="submit" value="生成试卷"/>
						</form>
						<h2>Java高级<br><br></h2>
						<div class="question_model">
							<p>1、自定义考题题目</p>
							<div class="options">
								<p class="option"><label class="labelInfo QUESTION_TYPE_SINGLE"><i></i>自定义选项A </label></p>
								<p class="option"><label class="labelInfo QUESTION_TYPE_SINGLE"><i></i>自定义选项B</label></p>
								<p class="option"><label class="labelInfo QUESTION_TYPE_SINGLE"><i></i>自定义选项C</label></p>
								<p class="option"><label class="labelInfo QUESTION_TYPE_SINGLE"><i></i>自定义选项D</label></p>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<form action="#" method="POST" id="create_project" callback="createProjectFn">
			<input name="project_json" type="hidden">
			<input name="_xsrf" type="hidden">
		</form>
		<script type="text/javascript" src="js/create_text_project.js"></script>
		<script type="text/javascript" src="js/juicer.js"></script>
		<!--弹出框-->
		<link href="css/jsbox.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="js/jsbox.js"></script>
		<!--加载提示-->
		<link href="css/load.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="js/load.js"></script>
	</body>
	<script type="text/javascript" src="/TestManagementSystem/js/jquery-1.4.1.js" ></script>
	<script type="text/javascript">
	$(function(){
		sendajax();
	});
	function sendajax(){
		$.ajax({
			url:"http://localhost:8080/TestManagementSystem/admin/exempaperServlet/showMsg", //发送请求的地址
			dataType:"json",
			success:function(data){ 
				showSource(data);
			}
		});	
	}
	/*
	显示数据
	*/
	function showSource(datas){
		for(var i = 0; i < datas.length; i++){
		var data = datas[i];
		if(null==data.gradeId){
			// 科目实体
			$("select[name=courseId]").append("<option value="+data.courseId+">"+data.courseName+"</option>");
			
		}else{
			// 年级实体
			$("select[name=gradeId]").append("<option value="+data.gradeId+">"+data.gradeName+"</option>");
		}
	}
}
	</script>

</html>